package com.runfast.waimai.utils.rabbitmq;

import com.runfast.paotui.dao.model.Order;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class OrderSender {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(Order order) {
        this.rabbitTemplate.convertAndSend("orderService", order);
    }
}
